<!DOCTYPE html>
<!-- 
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.1.1
Version: 2.0.2
Author: KeenThemes
Website: http://www.keenthemes.com/
Contact: support@keenthemes.com
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
-->
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<!--<![endif]-->
<!-- BEGIN HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
<!-- BEGIN CONTAINER -->
	<!-- BEGIN CONTENT -->
	<div ng-controller="changeOrderLogController">
	
	<div class="form-group" style="margin: 0px;" id="queryOrderResportSerchModel">
			<div class="row">
				<label class="col-sm-2 control-label text-right" >内容</label>
				<div class="col-sm-3">
					<div class="input-group">
						<input type="text" class="form-control" ng-model="orderSearchModel.queryValue"  ng-disabled="false" />
					 </div>
				</div> 
				<label class="col-sm-2 control-label text-right"  >开始日期</label>
				<div class="col-sm-2"> 
					<div class="input-group">
						<input class="form-control getTime" data-format="yyyy-MM-dd" type="text" readOnly="true"    ng-model="orderSearchModel.startDate" ng-change="onClickStartTime()"/>
					</div>
				</div>
				</div>
				 <div class="row">
				<label class="col-sm-2 control-label text-right" >查询类型</label>
				<div class="col-sm-3">
					<div class="input-group">
						<select ng-model="orderSearchModel.queryType" class="form-control">
							 <option value="">请选择查询类型</option>
							 <option value="1">用户id</option>
							 <option value="2">订单号</option>
							 <option value="3">操作员电话</option>
						</select> 
					 </div>
				</div> 
				<label class="col-sm-2 control-label text-right"  >结束日期</label>
				<div class="col-sm-2"> 
					<div class="input-group"> 
						<input class="form-control getTime" data-format="yyyy-MM-dd"    readOnly="true" 	type="text" ng-model="orderSearchModel.endDate"/>
					</div>
				</div>
				<div class="col-sm-1">
					<div class="input-group">
						<button type="button" class="btn btn-primary"  ng-click="queryOrderResport()"  ><i class="fa "></i>查询</button>
					</div>
				</div>
			</div>
	</div>
	<hr />
	<table class="table table-striped table-bordered table-hover" id="table_1">
		<thead>
			<tr>
				<th>订单号</th>
				<th>用户id</th>
				<th>操作员电话</th>
				<th>订单创建时间</th>
				<th>修改时间</th>
				<!-- <th>描述</th> -->
			</tr>
		</thead>
		<tbody>
			<tr class="odd gradeX" ng-repeat-start="l in query track by $index"   ng-click="showOrderlog($event,l.orderNo)" on-loaded="false" target-table="table_1">
				<td><span ng-bind="l.orderChangeInfo.orderNo"></span></td>
				<td><span ng-bind="l.orderChangeInfo.userId"></span></td>
				<td><span ng-bind="l.orderChangeInfo.userMobileNo"></span></td>
				<td><span ng-bind="l.orderChangeInfo.orderCreateTime"></span></td>
				<td><span ng-bind="l.orderChangeInfo.createTime"></span></td>
				<!-- <td><span ng-bind="l.orderChangeInfo.msg"></span></td> -->
			</tr>
			<!-- 订单信息 -->
			<tr hidden="hidden"  >
				<td colspan="5">
				<table class="table table-striped table-bordered table-hover" id="table_1">
					<tbody>
					<tr> 
					<td ng-style="getStyle(-1,'info')">金额</td> 
					<td ng-style="getStyle(-1,'info')">卡号</td>   
					<td ng-style="getStyle(-1,'info')">主服务</td> 
					<td ng-style="getStyle(-1,'info')">用户类型</td> 
					<td ng-style="getStyle(-1,'info')">订单状态</td>
					<td ng-style="getStyle(-1,'info')">创建时间</td> </tr>
					<tr>
					<td ng-style="getStyle(0,'info')"><span  ng-bind="l.orderInfo.caculatedTotalPrice"></span></td>
					<td ng-style="getStyle(0,'info')"><span ng-bind="l.orderInfo.cardNo"></span></td>
					<td ng-style="getStyle(0,'info')"><span ng-bind="l.orderInfo.serviceName"></span></td>
					<td ng-style="getStyle(0,'info')"><span ng-bind="l.orderInfo.userTypeName"></span></td>
					<td ng-style="getStyle(0,'info')"><span ng-bind="l.orderInfo.statusName"></span></td>
					<td ng-style="getStyle(0,'info')"><span ng-bind="l.orderInfo.createTime"></span></td>
					</tr></tbody>
				</table>
			</td>
			</tr>
			<!-- 订单项 -->
			<tr   hidden="hidden" >
				<td colspan="6">
				<table class="table table-striped table-bordered table-hover">
							<tr >
							  <td ng-style="getStyle(-1,'item')">服务编号</td>
							　<td ng-style="getStyle(-1,'item')">运营商编号</td>
							　<td ng-style="getStyle(-1,'item')">数量</td>
							　<td ng-style="getStyle(-1,'item')">单价</td>
							　<td ng-style="getStyle(-1,'item')">总价</td>
							　<td ng-style="getStyle(-1,'item')">实际价格</td>
							　<td ng-style="getStyle(-1,'item')">开始时间</td>
							　<td ng-style="getStyle(-1,'item')">结束时间</td>
							</tr>
						<tr ng-repeat="item in l.orderItem   "  class="odd gradeX"  >
							<td ng-style="getStyle($index,'item')"><span ng-bind="item.serviceName"></span></td>
							<td ng-style="getStyle($index,'item')"><span ng-bind="item.serviceProvider" ></span></td>
							<td ng-style="getStyle($index,'item')"><span ng-bind="item.buyNum"  ></span></td>
							<td ng-style="getStyle($index,'item')"><span ng-bind="item.unitPrice"  ></span></td>
							<td ng-style="getStyle($index,'item')"><span ng-bind="item.totalPrice"  ></span></td>
							<td ng-style="getStyle($index,'item')"><span ng-bind="item.realTotalPrice"></span></td>
							<td ng-style="getStyle($index,'item')"><span ng-bind="item.startTime"  ></span></td>
							<td ng-style="getStyle($index,'item')"><span ng-bind="item.endTime"></span></td>
						</tr>
					</table>
				</td>
			</tr> 	
			<!-- 订单分层 -->
			<tr   hidden="hidden"  >
				<td colspan="6">
				<table class="table table-striped table-bordered table-hover">
						<tr> 
							<td ng-style="getStyle(-1,'detail')">服务编号</td>
							<td ng-style="getStyle(-1,'detail')">运营商编号</td>
							<td ng-style="getStyle(-1,'detail')">收入的运营商</td>
							<td ng-style="getStyle(-1,'detail')">分账比例</td>
							<td ng-style="getStyle(-1,'detail')">原始价格</td>
							<td ng-style="getStyle(-1,'detail')">分润后的价格</td>								
						</tr>
						<tr ng-repeat="item in l.orderItemDividedDetail " class="odd gradeX" >
							<td ng-style="getStyle($index,'detail')"><span ng-bind="item.serviceName"></span></td>
							<td ng-style="getStyle($index,'detail')"><span ng-bind="item.serviceProvider" ></span></td>
							<td ng-style="getStyle($index,'detail')"><span ng-bind="item.receiver"></span></td>
							<td ng-style="getStyle($index,'detail')"><span ng-bind="item.currentRatio"></span></td>
							<td ng-style="getStyle($index,'detail')"><span ng-bind="item.totalPrice"></span></td>
							<td ng-style="getStyle($index,'detail')"><span ng-bind="item.splitedPrice"></span></td>
						</tr>
					</table>
				</td>
			</tr> 	
			<tr ng-repeat-end></tr>
		</tbody>
	</table>
	   <div class="ngPaper">
	     <ngpaper  page-count="pageCount" current-page="currentPage" on-page-change="onPageChange()" first-text="首页" next-text="下一页" prev-text="上一页" last-text="尾页"></ngpaper>
    </div>
</div>
<!-- END CONTENT -->
<!-- END CONTAINER -->
<script src="/static/common/plugin/pagination/src/ng-pagination.js" type="text/javascript"/>
<link href="/static/common/plugin/pagination/src/ng-pagination.css" rel="stylesheet" />
<script>
$(function(){
	//绑定确认框
	$().bootboxWindow_confirm();
	//选择初始化
	$('.getTime').datetimepicker({
		language: 'zh-CN',
        inputMask: false,
		todayBtn: false,
		autoclose: true,
		minView: 2,
		startView: 2,
		format: "yyyy-mm-dd"
	});
	$('.getTime').css('cursor','pointer');
 });
$(function(){dz_public_init();});
</script>
</body>
<!-- END BODY -->
</html>